import { axios } from '@/utils/request'

export function allGetTaskList(data) {
  return axios({
    url: '/sys/task/pageQueryTasks',
    method: 'post',
    data
  })
}
export function allOnlineTaskAdd(data) {
  return axios({
    url: '/sys/task/addOnlineTask',
    method: 'post',
    data
  })
}
export function allOnlineTaskEdit(data) {
  return axios({
    url: '/sys/task/updateOnlineTask',
    method: 'post',
    data
  })
}
export function allOnlineTaskEnterpriseApply(data) {
  return axios({
    url: '/sys/task/commitTask',
    method: 'post',
    data
  })
}
export function allOnlineTaskParkApply(data) {
  return axios({
    url: '/sys/task/approvePublishTask',
    method: 'post',
    data
  })
}
export function allOnlineTaskParkReject(data) {
  return axios({
    url: '/sys/task/rejectTask',
    method: 'post',
    data
  })
}
export function allOnlineTaskDel(data) {
  return axios({
    url: '/sys/task/deleteTask',
    method: 'post',
    data
  })
}
export function allOnlineTaskComplete(data) {
  return axios({
    url: '/sys/task/completeTask',
    method: 'post',
    data
  })
}
export function allImportOfflineTaskTemp(data) {
  return axios({
    url: '/sys/task/addOfflineTask',
    method: 'post',
    data
  })
}
export function allGetOfflineTaskTemp() {
  return axios({
    url: '/sys/task/offlineTemp',
    method: 'get'
  })
}
export function allGetOfflineTaskSttleTemp() {
  return axios({
    url: '/sys/pt/settle/offlineTemp',
    method: 'get'
  })
}
export function allImportOfflineTaskSttlePerson(data) {
  return axios({
    url: '/sys/pt/settle/importOfflineTaskSettlementPerson',
    method: 'post',
    data
  })
}
export function allOfflineTaskSttlePersonSubmit(data) {
  return axios({
    url: '/sys/pt/settle/subOfflineTaskSettlementPerson',
    method: 'post',
    data
  })
}
export function allOnlineTaskDetail(id) {
  return axios({
    url: '/sys/task/taskDetail?id='+id,
    method: 'get'
  })
}
export function taskExprotFailUser(data) {
  return axios({
    url: '/sys/pt/settle/exportFailRecord',
    method: 'post',
    responseType: 'arraybuffer',
    data
  })
}
export function exportTaskExcel(data) {
  return axios({
    url: '/sys/task/exportTaskExcel',
    method: 'post',
    responseType: 'arraybuffer',
    data
  })
}
export function taskDelFailUser(data) {
  return axios({
    url: '/sys/pt/settle/deleteFailRecord',
    method: 'post',
    data
  })
}